<?php

use think\facade\Route;

/* 分类 */

Route::rule('type', 'type/index', 'GET')->allowCrossDomain();

/* 系统设置 */
Route::rule('system', 'index/system', 'GET')->allowCrossDomain();
Route::rule('question', 'index/question', 'GET')->allowCrossDomain();

/* 通知中心 */
Route::rule('noticeList', 'notice/list', 'GET')->allowCrossDomain();
Route::rule('notice', 'notice/getOne', 'GET')->allowCrossDomain();

/* 用户 */
Route::rule('sendSms', 'user/sendSms', 'POST')->allowCrossDomain();
Route::rule('login', 'user/login', 'POST')->allowCrossDomain();
Route::rule('register', 'user/register', 'POST')->allowCrossDomain();
Route::rule('findPassword', 'user/findPassword', 'POST')->allowCrossDomain();
Route::rule('info', 'user/info', 'GET')->allowCrossDomain();
Route::rule('suggest', 'user/suggest', 'POST')->allowCrossDomain();
Route::rule('contribute', 'user/contribute', 'POST')->allowCrossDomain();
Route::rule('modifyUsername', 'user/modifyUsername', 'POST')->allowCrossDomain();
Route::rule('modifySignature', 'user/modifySignature', 'POST')->allowCrossDomain();
Route::rule('modifyPassword', 'user/modifyPassword', 'POST')->allowCrossDomain();
Route::rule('modifyNickname', 'user/modifyNickname', 'POST')->allowCrossDomain();
Route::rule('bindWX', 'user/bindWX', 'POST')->allowCrossDomain();
Route::rule('unbindWX', 'user/unbindWX', 'GET')->allowCrossDomain();
Route::rule('bindQQ', 'user/bindQQ', 'POST')->allowCrossDomain();
Route::rule('unbindQQ', 'user/unbindQQ', 'GET')->allowCrossDomain();
Route::rule('uploadAvatar', 'user/uploadAvatar', 'POST')->allowCrossDomain();

/* 文章 */
Route::rule('articleList', 'article/list', 'GET')->allowCrossDomain();
Route::rule('articleType', 'article/type', 'GET')->allowCrossDomain();
Route::rule('articleHot', 'article/hot', 'GET')->allowCrossDomain();
Route::rule('articleTypeList', 'article/typeList', 'GET')->allowCrossDomain();
Route::rule('articleMoreList', 'article/moreList', 'GET')->allowCrossDomain();
Route::rule('articleOne', 'article/getOne', 'GET')->allowCrossDomain();

/* 音频 */
Route::rule('voiceList', 'voice/list', 'GET')->allowCrossDomain();
Route::rule('voiceType', 'voice/type', 'GET')->allowCrossDomain();
Route::rule('voiceHot', 'voice/hot', 'GET')->allowCrossDomain();
Route::rule('voiceTypeList', 'voice/typeList', 'GET')->allowCrossDomain();
Route::rule('voiceMoreList', 'voice/moreList', 'GET')->allowCrossDomain();
Route::rule('voiceOne', 'voice/getOne', 'GET')->allowCrossDomain();

/* 视频 */
Route::rule('videoList', 'video/list', 'GET')->allowCrossDomain();
Route::rule('videoType', 'video/type', 'GET')->allowCrossDomain();
Route::rule('videoHot', 'video/hot', 'GET')->allowCrossDomain();
Route::rule('videoTypeList', 'video/typeList', 'GET')->allowCrossDomain();
Route::rule('videoMoreList', 'video/moreList', 'GET')->allowCrossDomain();
Route::rule('videoOne', 'video/getOne', 'GET')->allowCrossDomain();

/* 点赞 */
Route::rule('star', 'star/index', 'POST')->allowCrossDomain();

/* 收藏 */
Route::rule('favoriteList', 'favorite/list', 'GET')->allowCrossDomain();
Route::rule('favorite', 'favorite/index', 'POST')->allowCrossDomain();

/* 历史记录 */
Route::rule('view', 'view/list', 'GET')->allowCrossDomain();
Route::rule('viewDelete', 'view/delete', 'DELETE')->allowCrossDomain();
Route::rule('viewDeleteAll', 'view/deleteAll', 'DELETE')->allowCrossDomain();
Route::rule('viewFlush', 'view/flush', 'DELETE')->allowCrossDomain();
